{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. k-means聚类\n",
    "\n",
    "熟悉各中聚类算法的调用\n",
    "并用评价指标选择合适的超参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#导入必要的工具包\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.cluster import MiniBatchKMeans\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn import metrics\n",
    "\n",
    "from sklearn.decomposition import PCA\n",
    "import time\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>LocaleId</th>\n",
       "      <th>BirthYearInt</th>\n",
       "      <th>GenderId</th>\n",
       "      <th>JoinedYearMonth</th>\n",
       "      <th>TimezoneInt</th>\n",
       "      <th>cluster_20</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000016</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>0.000042</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000018</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>9</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>10</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>11</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>12</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>13</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000018</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>14</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000022</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>15</td>\n",
       "      <td>0.000029</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>16</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>17</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>18</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>19</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>20</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>21</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000018</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>22</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>23</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>24</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000022</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>25</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>26</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000022</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>27</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>28</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>29</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>38179</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000022</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>38180</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>38181</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000040</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>38182</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>38183</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>38184</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>38185</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>38186</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>38187</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>38188</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>38189</td>\n",
       "      <td>0.000035</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000004</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>38190</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>38191</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000031</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>38192</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>38193</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>38194</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>38195</td>\n",
       "      <td>0.000040</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000022</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>38196</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>38197</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>38198</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>38199</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>38200</td>\n",
       "      <td>0.000059</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000009</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>38201</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>38202</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>38203</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>38204</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>38205</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>38206</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>38207</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>38208</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       Unnamed: 0  LocaleId  BirthYearInt  GenderId  JoinedYearMonth  \\\n",
       "0               0  0.000036      0.000027  0.000019         0.000026   \n",
       "1               1  0.000036      0.000027  0.000019         0.000026   \n",
       "2               2  0.000020      0.000027  0.000019         0.000026   \n",
       "3               3  0.000020      0.000027  0.000038         0.000027   \n",
       "4               4  0.000036      0.000027  0.000038         0.000026   \n",
       "5               5  0.000042      0.000027  0.000038         0.000027   \n",
       "6               6  0.000036      0.000027  0.000019         0.000026   \n",
       "7               7  0.000036      0.000027  0.000038         0.000026   \n",
       "8               8  0.000036      0.000027  0.000019         0.000026   \n",
       "9               9  0.000036      0.000027  0.000038         0.000026   \n",
       "10             10  0.000020      0.000027  0.000019         0.000026   \n",
       "11             11  0.000020      0.000027  0.000038         0.000026   \n",
       "12             12  0.000036      0.000027  0.000038         0.000026   \n",
       "13             13  0.000020      0.000027  0.000038         0.000026   \n",
       "14             14  0.000000      0.000000  0.000019         0.000025   \n",
       "15             15  0.000029      0.000027  0.000019         0.000026   \n",
       "16             16  0.000000      0.000027  0.000019         0.000025   \n",
       "17             17  0.000036      0.000027  0.000019         0.000026   \n",
       "18             18  0.000036      0.000027  0.000019         0.000026   \n",
       "19             19  0.000020      0.000000  0.000019         0.000022   \n",
       "20             20  0.000036      0.000027  0.000019         0.000026   \n",
       "21             21  0.000019      0.000027  0.000038         0.000026   \n",
       "22             22  0.000020      0.000027  0.000019         0.000026   \n",
       "23             23  0.000020      0.000027  0.000038         0.000026   \n",
       "24             24  0.000036      0.000027  0.000019         0.000027   \n",
       "25             25  0.000020      0.000027  0.000019         0.000023   \n",
       "26             26  0.000036      0.000027  0.000019         0.000027   \n",
       "27             27  0.000020      0.000027  0.000038         0.000026   \n",
       "28             28  0.000020      0.000027  0.000038         0.000026   \n",
       "29             29  0.000020      0.000027  0.000019         0.000027   \n",
       "...           ...       ...           ...       ...              ...   \n",
       "38179       38179  0.000000      0.000027  0.000019         0.000026   \n",
       "38180       38180  0.000036      0.000027  0.000019         0.000027   \n",
       "38181       38181  0.000020      0.000027  0.000019         0.000027   \n",
       "38182       38182  0.000036      0.000027  0.000019         0.000026   \n",
       "38183       38183  0.000020      0.000000  0.000019         0.000022   \n",
       "38184       38184  0.000020      0.000027  0.000038         0.000026   \n",
       "38185       38185  0.000036      0.000027  0.000038         0.000026   \n",
       "38186       38186  0.000036      0.000027  0.000019         0.000026   \n",
       "38187       38187  0.000036      0.000027  0.000019         0.000026   \n",
       "38188       38188  0.000020      0.000027  0.000019         0.000023   \n",
       "38189       38189  0.000035      0.000027  0.000038         0.000027   \n",
       "38190       38190  0.000036      0.000027  0.000019         0.000026   \n",
       "38191       38191  0.000036      0.000027  0.000038         0.000026   \n",
       "38192       38192  0.000036      0.000027  0.000038         0.000026   \n",
       "38193       38193  0.000000      0.000027  0.000019         0.000025   \n",
       "38194       38194  0.000036      0.000027  0.000019         0.000026   \n",
       "38195       38195  0.000040      0.000027  0.000038         0.000025   \n",
       "38196       38196  0.000020      0.000027  0.000038         0.000026   \n",
       "38197       38197  0.000036      0.000027  0.000019         0.000026   \n",
       "38198       38198  0.000020      0.000027  0.000019         0.000027   \n",
       "38199       38199  0.000019      0.000027  0.000038         0.000027   \n",
       "38200       38200  0.000059      0.000027  0.000019         0.000026   \n",
       "38201       38201  0.000036      0.000027  0.000019         0.000026   \n",
       "38202       38202  0.000036      0.000027  0.000019         0.000026   \n",
       "38203       38203  0.000036      0.000027  0.000038         0.000027   \n",
       "38204       38204  0.000020      0.000027  0.000038         0.000023   \n",
       "38205       38205  0.000036      0.000027  0.000019         0.000026   \n",
       "38206       38206  0.000036      0.000027  0.000019         0.000026   \n",
       "38207       38207  0.000020      0.000027  0.000019         0.000026   \n",
       "38208       38208  0.000020      0.000027  0.000019         0.000027   \n",
       "\n",
       "       TimezoneInt  cluster_20  \n",
       "0         0.000036           1  \n",
       "1         0.000031           1  \n",
       "2        -0.000018           2  \n",
       "3         0.000016          10  \n",
       "4         0.000031           7  \n",
       "5         0.000018          10  \n",
       "6         0.000031           1  \n",
       "7         0.000031           7  \n",
       "8         0.000031           1  \n",
       "9         0.000031           7  \n",
       "10        0.000031           9  \n",
       "11        0.000031           3  \n",
       "12        0.000031           7  \n",
       "13        0.000018           3  \n",
       "14       -0.000022           0  \n",
       "15       -0.000018           2  \n",
       "16       -0.000018          16  \n",
       "17        0.000031           1  \n",
       "18        0.000020           1  \n",
       "19       -0.000018           0  \n",
       "20        0.000031           1  \n",
       "21        0.000018           3  \n",
       "22        0.000031           9  \n",
       "23        0.000031           3  \n",
       "24       -0.000022          18  \n",
       "25       -0.000018           2  \n",
       "26       -0.000022          18  \n",
       "27       -0.000018           5  \n",
       "28        0.000031           3  \n",
       "29       -0.000036          17  \n",
       "...            ...         ...  \n",
       "38179    -0.000022          16  \n",
       "38180     0.000031           1  \n",
       "38181     0.000040           9  \n",
       "38182     0.000031           1  \n",
       "38183    -0.000018           0  \n",
       "38184     0.000031           3  \n",
       "38185     0.000031           7  \n",
       "38186     0.000031           1  \n",
       "38187     0.000031           1  \n",
       "38188    -0.000018           2  \n",
       "38189     0.000004          10  \n",
       "38190     0.000031           1  \n",
       "38191    -0.000031          12  \n",
       "38192     0.000031           7  \n",
       "38193     0.000013           8  \n",
       "38194     0.000031           1  \n",
       "38195    -0.000022          12  \n",
       "38196    -0.000018           5  \n",
       "38197     0.000031           1  \n",
       "38198    -0.000036          17  \n",
       "38199     0.000031           3  \n",
       "38200    -0.000009          15  \n",
       "38201     0.000031           1  \n",
       "38202     0.000031           1  \n",
       "38203     0.000031           7  \n",
       "38204    -0.000018           5  \n",
       "38205     0.000031           1  \n",
       "38206     0.000031           1  \n",
       "38207     0.000031           9  \n",
       "38208    -0.000036          17  \n",
       "\n",
       "[38209 rows x 7 columns]"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#读取训练数据\n",
    "train = pd.read_csv('users_FE_MiniBatchKMeans.csv')\n",
    "train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LocaleId</th>\n",
       "      <th>BirthYearInt</th>\n",
       "      <th>GenderId</th>\n",
       "      <th>JoinedYearMonth</th>\n",
       "      <th>TimezoneInt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000016</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.000042</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.000029</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>0.000035</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000004</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.000013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>0.000040</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>0.000059</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       LocaleId  BirthYearInt  GenderId  JoinedYearMonth  TimezoneInt\n",
       "0      0.000036      0.000027  0.000019         0.000026     0.000036\n",
       "1      0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "2      0.000020      0.000027  0.000019         0.000026    -0.000018\n",
       "3      0.000020      0.000027  0.000038         0.000027     0.000016\n",
       "4      0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "5      0.000042      0.000027  0.000038         0.000027     0.000018\n",
       "6      0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "7      0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "8      0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "9      0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "10     0.000020      0.000027  0.000019         0.000026     0.000031\n",
       "11     0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "12     0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "13     0.000020      0.000027  0.000038         0.000026     0.000018\n",
       "14     0.000000      0.000000  0.000019         0.000025    -0.000022\n",
       "15     0.000029      0.000027  0.000019         0.000026    -0.000018\n",
       "16     0.000000      0.000027  0.000019         0.000025    -0.000018\n",
       "17     0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "18     0.000036      0.000027  0.000019         0.000026     0.000020\n",
       "19     0.000020      0.000000  0.000019         0.000022    -0.000018\n",
       "20     0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "21     0.000019      0.000027  0.000038         0.000026     0.000018\n",
       "22     0.000020      0.000027  0.000019         0.000026     0.000031\n",
       "23     0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "24     0.000036      0.000027  0.000019         0.000027    -0.000022\n",
       "25     0.000020      0.000027  0.000019         0.000023    -0.000018\n",
       "26     0.000036      0.000027  0.000019         0.000027    -0.000022\n",
       "27     0.000020      0.000027  0.000038         0.000026    -0.000018\n",
       "28     0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "29     0.000020      0.000027  0.000019         0.000027    -0.000036\n",
       "...         ...           ...       ...              ...          ...\n",
       "38179  0.000000      0.000027  0.000019         0.000026    -0.000022\n",
       "38180  0.000036      0.000027  0.000019         0.000027     0.000031\n",
       "38181  0.000020      0.000027  0.000019         0.000027     0.000040\n",
       "38182  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38183  0.000020      0.000000  0.000019         0.000022    -0.000018\n",
       "38184  0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "38185  0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "38186  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38187  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38188  0.000020      0.000027  0.000019         0.000023    -0.000018\n",
       "38189  0.000035      0.000027  0.000038         0.000027     0.000004\n",
       "38190  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38191  0.000036      0.000027  0.000038         0.000026    -0.000031\n",
       "38192  0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "38193  0.000000      0.000027  0.000019         0.000025     0.000013\n",
       "38194  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38195  0.000040      0.000027  0.000038         0.000025    -0.000022\n",
       "38196  0.000020      0.000027  0.000038         0.000026    -0.000018\n",
       "38197  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38198  0.000020      0.000027  0.000019         0.000027    -0.000036\n",
       "38199  0.000019      0.000027  0.000038         0.000027     0.000031\n",
       "38200  0.000059      0.000027  0.000019         0.000026    -0.000009\n",
       "38201  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38202  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38203  0.000036      0.000027  0.000038         0.000027     0.000031\n",
       "38204  0.000020      0.000027  0.000038         0.000023    -0.000018\n",
       "38205  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38206  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38207  0.000020      0.000027  0.000019         0.000026     0.000031\n",
       "38208  0.000020      0.000027  0.000019         0.000027    -0.000036\n",
       "\n",
       "[38209 rows x 5 columns]"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train = train.drop([\"Unnamed: 0\", \"cluster_20\"],axis=1)\n",
    "y_train = train.cluster_20\n",
    "X_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "the shape of train_image: (38209, 5)\n"
     ]
    }
   ],
   "source": [
    "# 原始输入的特征维数和样本数目\n",
    "print('the shape of train_image: {}'.format(X_train.shape))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "X_train_amplified = X_train * 10000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LocaleId</th>\n",
       "      <th>BirthYearInt</th>\n",
       "      <th>GenderId</th>\n",
       "      <th>JoinedYearMonth</th>\n",
       "      <th>TimezoneInt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272952</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.355744</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272815</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.270487</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272678</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.155638</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273226</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.415378</td>\n",
       "      <td>0.270213</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.269117</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.271035</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272267</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272815</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.273363</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272952</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.273363</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.248260</td>\n",
       "      <td>-0.222340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.289281</td>\n",
       "      <td>0.272815</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.272952</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.248260</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272541</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272952</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.200106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.224986</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272267</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>0.188403</td>\n",
       "      <td>0.272267</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272815</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>-0.222340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272130</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.232744</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272952</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>-0.222340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272267</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272267</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>-0.355744</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.272815</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>-0.222340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273226</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.271856</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.400212</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.271583</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.224986</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.273363</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272404</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272130</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.232744</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>0.353071</td>\n",
       "      <td>0.268022</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.044468</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272267</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273363</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>-0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273637</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.271172</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.248260</td>\n",
       "      <td>0.133404</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273226</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>0.400543</td>\n",
       "      <td>0.271719</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.248260</td>\n",
       "      <td>-0.222340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272815</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.256019</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273089</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272678</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>-0.355744</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>0.188403</td>\n",
       "      <td>0.273226</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>0.585979</td>\n",
       "      <td>0.272404</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>-0.088936</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273500</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273500</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.272952</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.269254</td>\n",
       "      <td>0.377658</td>\n",
       "      <td>0.232744</td>\n",
       "      <td>-0.177872</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273500</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>0.364939</td>\n",
       "      <td>0.273226</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.272404</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.263777</td>\n",
       "      <td>0.311276</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>0.201755</td>\n",
       "      <td>0.271172</td>\n",
       "      <td>0.188829</td>\n",
       "      <td>0.271535</td>\n",
       "      <td>-0.355744</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       LocaleId  BirthYearInt  GenderId  JoinedYearMonth  TimezoneInt\n",
       "0      0.364939      0.272952  0.188829         0.263777     0.355744\n",
       "1      0.364939      0.272815  0.188829         0.256019     0.311276\n",
       "2      0.201755      0.270487  0.188829         0.263777    -0.177872\n",
       "3      0.201755      0.272678  0.377658         0.271535     0.155638\n",
       "4      0.364939      0.273226  0.377658         0.256019     0.311276\n",
       "5      0.415378      0.270213  0.377658         0.271535     0.177872\n",
       "6      0.364939      0.273089  0.188829         0.263777     0.311276\n",
       "7      0.364939      0.269117  0.377658         0.263777     0.311276\n",
       "8      0.364939      0.271035  0.188829         0.263777     0.311276\n",
       "9      0.364939      0.272267  0.377658         0.263777     0.311276\n",
       "10     0.201755      0.272815  0.188829         0.256019     0.311276\n",
       "11     0.201755      0.273363  0.377658         0.263777     0.311276\n",
       "12     0.364939      0.272952  0.377658         0.263777     0.311276\n",
       "13     0.201755      0.273363  0.377658         0.263777     0.177872\n",
       "14     0.000000      0.000000  0.188829         0.248260    -0.222340\n",
       "15     0.289281      0.272815  0.188829         0.256019    -0.177872\n",
       "16     0.000000      0.272952  0.188829         0.248260    -0.177872\n",
       "17     0.364939      0.272541  0.188829         0.263777     0.311276\n",
       "18     0.364939      0.272952  0.188829         0.263777     0.200106\n",
       "19     0.201755      0.000000  0.188829         0.224986    -0.177872\n",
       "20     0.364939      0.272267  0.188829         0.263777     0.311276\n",
       "21     0.188403      0.272267  0.377658         0.263777     0.177872\n",
       "22     0.201755      0.272815  0.188829         0.263777     0.311276\n",
       "23     0.201755      0.273089  0.377658         0.263777     0.311276\n",
       "24     0.364939      0.273089  0.188829         0.271535    -0.222340\n",
       "25     0.201755      0.272130  0.188829         0.232744    -0.177872\n",
       "26     0.364939      0.272952  0.188829         0.271535    -0.222340\n",
       "27     0.201755      0.272267  0.377658         0.256019    -0.177872\n",
       "28     0.201755      0.273089  0.377658         0.263777     0.311276\n",
       "29     0.201755      0.272267  0.188829         0.271535    -0.355744\n",
       "...         ...           ...       ...              ...          ...\n",
       "38179  0.000000      0.272815  0.188829         0.256019    -0.222340\n",
       "38180  0.364939      0.273226  0.188829         0.271535     0.311276\n",
       "38181  0.201755      0.271856  0.188829         0.271535     0.400212\n",
       "38182  0.364939      0.271583  0.188829         0.263777     0.311276\n",
       "38183  0.201755      0.000000  0.188829         0.224986    -0.177872\n",
       "38184  0.201755      0.273363  0.377658         0.263777     0.311276\n",
       "38185  0.364939      0.273089  0.377658         0.263777     0.311276\n",
       "38186  0.364939      0.273089  0.188829         0.263777     0.311276\n",
       "38187  0.364939      0.272404  0.188829         0.263777     0.311276\n",
       "38188  0.201755      0.272130  0.188829         0.232744    -0.177872\n",
       "38189  0.353071      0.268022  0.377658         0.271535     0.044468\n",
       "38190  0.364939      0.272267  0.188829         0.263777     0.311276\n",
       "38191  0.364939      0.273363  0.377658         0.256019    -0.311276\n",
       "38192  0.364939      0.273637  0.377658         0.263777     0.311276\n",
       "38193  0.000000      0.271172  0.188829         0.248260     0.133404\n",
       "38194  0.364939      0.273226  0.188829         0.256019     0.311276\n",
       "38195  0.400543      0.271719  0.377658         0.248260    -0.222340\n",
       "38196  0.201755      0.272815  0.377658         0.256019    -0.177872\n",
       "38197  0.364939      0.273089  0.188829         0.263777     0.311276\n",
       "38198  0.201755      0.272678  0.188829         0.271535    -0.355744\n",
       "38199  0.188403      0.273226  0.377658         0.271535     0.311276\n",
       "38200  0.585979      0.272404  0.188829         0.263777    -0.088936\n",
       "38201  0.364939      0.273500  0.188829         0.263777     0.311276\n",
       "38202  0.364939      0.273500  0.188829         0.263777     0.311276\n",
       "38203  0.364939      0.272952  0.377658         0.271535     0.311276\n",
       "38204  0.201755      0.269254  0.377658         0.232744    -0.177872\n",
       "38205  0.364939      0.273500  0.188829         0.263777     0.311276\n",
       "38206  0.364939      0.273226  0.188829         0.263777     0.311276\n",
       "38207  0.201755      0.272404  0.188829         0.263777     0.311276\n",
       "38208  0.201755      0.271172  0.188829         0.271535    -0.355744\n",
       "\n",
       "[38209 rows x 5 columns]"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train_amplified"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LocaleId           0.000081\n",
       "BirthYearInt       0.000027\n",
       "GenderId           0.000038\n",
       "JoinedYearMonth    0.000028\n",
       "TimezoneInt        0.000062\n",
       "dtype: float64"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LocaleId           0.000000\n",
       "BirthYearInt       0.000000\n",
       "GenderId           0.000000\n",
       "JoinedYearMonth    0.000000\n",
       "TimezoneInt       -0.000053\n",
       "dtype: float64"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LocaleId</th>\n",
       "      <th>BirthYearInt</th>\n",
       "      <th>GenderId</th>\n",
       "      <th>JoinedYearMonth</th>\n",
       "      <th>TimezoneInt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.729521</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.557437</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.728151</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.704869</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.726782</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>1.556379</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.732260</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>4.153775</td>\n",
       "      <td>2.702130</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.691173</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.710347</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.722673</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.728151</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.733630</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.729521</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.733630</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.482604</td>\n",
       "      <td>-2.223398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2.892808</td>\n",
       "      <td>2.728151</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.729521</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.482604</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.725412</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.729521</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>2.001058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.249860</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.722673</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>1.884034</td>\n",
       "      <td>2.722673</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.728151</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>-2.223398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.721304</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.327442</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.729521</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>-2.223398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.722673</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.722673</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>-3.557437</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.728151</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>-2.223398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.732260</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.718564</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>4.002117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.715825</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.249860</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.733630</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.724043</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.721304</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.327442</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>3.530709</td>\n",
       "      <td>2.680217</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>0.444680</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.722673</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.733630</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>-3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.736369</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.711717</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.482604</td>\n",
       "      <td>1.334039</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.732260</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>4.005426</td>\n",
       "      <td>2.717195</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.482604</td>\n",
       "      <td>-2.223398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.728151</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.560186</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.730890</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.726782</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>-3.557437</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>1.884034</td>\n",
       "      <td>2.732260</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>5.859790</td>\n",
       "      <td>2.724043</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>-0.889359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.734999</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.734999</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.729521</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.692543</td>\n",
       "      <td>3.776578</td>\n",
       "      <td>2.327442</td>\n",
       "      <td>-1.778719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.734999</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>3.649388</td>\n",
       "      <td>2.732260</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.724043</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.637767</td>\n",
       "      <td>3.112757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>2.017548</td>\n",
       "      <td>2.711717</td>\n",
       "      <td>1.888289</td>\n",
       "      <td>2.715348</td>\n",
       "      <td>-3.557437</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       LocaleId  BirthYearInt  GenderId  JoinedYearMonth  TimezoneInt\n",
       "0      3.649388      2.729521  1.888289         2.637767     3.557437\n",
       "1      3.649388      2.728151  1.888289         2.560186     3.112757\n",
       "2      2.017548      2.704869  1.888289         2.637767    -1.778719\n",
       "3      2.017548      2.726782  3.776578         2.715348     1.556379\n",
       "4      3.649388      2.732260  3.776578         2.560186     3.112757\n",
       "5      4.153775      2.702130  3.776578         2.715348     1.778719\n",
       "6      3.649388      2.730890  1.888289         2.637767     3.112757\n",
       "7      3.649388      2.691173  3.776578         2.637767     3.112757\n",
       "8      3.649388      2.710347  1.888289         2.637767     3.112757\n",
       "9      3.649388      2.722673  3.776578         2.637767     3.112757\n",
       "10     2.017548      2.728151  1.888289         2.560186     3.112757\n",
       "11     2.017548      2.733630  3.776578         2.637767     3.112757\n",
       "12     3.649388      2.729521  3.776578         2.637767     3.112757\n",
       "13     2.017548      2.733630  3.776578         2.637767     1.778719\n",
       "14     0.000000      0.000000  1.888289         2.482604    -2.223398\n",
       "15     2.892808      2.728151  1.888289         2.560186    -1.778719\n",
       "16     0.000000      2.729521  1.888289         2.482604    -1.778719\n",
       "17     3.649388      2.725412  1.888289         2.637767     3.112757\n",
       "18     3.649388      2.729521  1.888289         2.637767     2.001058\n",
       "19     2.017548      0.000000  1.888289         2.249860    -1.778719\n",
       "20     3.649388      2.722673  1.888289         2.637767     3.112757\n",
       "21     1.884034      2.722673  3.776578         2.637767     1.778719\n",
       "22     2.017548      2.728151  1.888289         2.637767     3.112757\n",
       "23     2.017548      2.730890  3.776578         2.637767     3.112757\n",
       "24     3.649388      2.730890  1.888289         2.715348    -2.223398\n",
       "25     2.017548      2.721304  1.888289         2.327442    -1.778719\n",
       "26     3.649388      2.729521  1.888289         2.715348    -2.223398\n",
       "27     2.017548      2.722673  3.776578         2.560186    -1.778719\n",
       "28     2.017548      2.730890  3.776578         2.637767     3.112757\n",
       "29     2.017548      2.722673  1.888289         2.715348    -3.557437\n",
       "...         ...           ...       ...              ...          ...\n",
       "38179  0.000000      2.728151  1.888289         2.560186    -2.223398\n",
       "38180  3.649388      2.732260  1.888289         2.715348     3.112757\n",
       "38181  2.017548      2.718564  1.888289         2.715348     4.002117\n",
       "38182  3.649388      2.715825  1.888289         2.637767     3.112757\n",
       "38183  2.017548      0.000000  1.888289         2.249860    -1.778719\n",
       "38184  2.017548      2.733630  3.776578         2.637767     3.112757\n",
       "38185  3.649388      2.730890  3.776578         2.637767     3.112757\n",
       "38186  3.649388      2.730890  1.888289         2.637767     3.112757\n",
       "38187  3.649388      2.724043  1.888289         2.637767     3.112757\n",
       "38188  2.017548      2.721304  1.888289         2.327442    -1.778719\n",
       "38189  3.530709      2.680217  3.776578         2.715348     0.444680\n",
       "38190  3.649388      2.722673  1.888289         2.637767     3.112757\n",
       "38191  3.649388      2.733630  3.776578         2.560186    -3.112757\n",
       "38192  3.649388      2.736369  3.776578         2.637767     3.112757\n",
       "38193  0.000000      2.711717  1.888289         2.482604     1.334039\n",
       "38194  3.649388      2.732260  1.888289         2.560186     3.112757\n",
       "38195  4.005426      2.717195  3.776578         2.482604    -2.223398\n",
       "38196  2.017548      2.728151  3.776578         2.560186    -1.778719\n",
       "38197  3.649388      2.730890  1.888289         2.637767     3.112757\n",
       "38198  2.017548      2.726782  1.888289         2.715348    -3.557437\n",
       "38199  1.884034      2.732260  3.776578         2.715348     3.112757\n",
       "38200  5.859790      2.724043  1.888289         2.637767    -0.889359\n",
       "38201  3.649388      2.734999  1.888289         2.637767     3.112757\n",
       "38202  3.649388      2.734999  1.888289         2.637767     3.112757\n",
       "38203  3.649388      2.729521  3.776578         2.715348     3.112757\n",
       "38204  2.017548      2.692543  3.776578         2.327442    -1.778719\n",
       "38205  3.649388      2.734999  1.888289         2.637767     3.112757\n",
       "38206  3.649388      2.732260  1.888289         2.637767     3.112757\n",
       "38207  2.017548      2.724043  1.888289         2.637767     3.112757\n",
       "38208  2.017548      2.711717  1.888289         2.715348    -3.557437\n",
       "\n",
       "[38209 rows x 5 columns]"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train * 100000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LocaleId</th>\n",
       "      <th>BirthYearInt</th>\n",
       "      <th>GenderId</th>\n",
       "      <th>JoinedYearMonth</th>\n",
       "      <th>TimezoneInt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000016</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.000042</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.000029</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>0.000035</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000004</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.000013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>0.000040</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>-0.000022</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>0.000059</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>-0.000009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000038</td>\n",
       "      <td>0.000023</td>\n",
       "      <td>-0.000018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000026</td>\n",
       "      <td>0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>-0.000036</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       LocaleId  BirthYearInt  GenderId  JoinedYearMonth  TimezoneInt\n",
       "0      0.000036      0.000027  0.000019         0.000026     0.000036\n",
       "1      0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "2      0.000020      0.000027  0.000019         0.000026    -0.000018\n",
       "3      0.000020      0.000027  0.000038         0.000027     0.000016\n",
       "4      0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "5      0.000042      0.000027  0.000038         0.000027     0.000018\n",
       "6      0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "7      0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "8      0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "9      0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "10     0.000020      0.000027  0.000019         0.000026     0.000031\n",
       "11     0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "12     0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "13     0.000020      0.000027  0.000038         0.000026     0.000018\n",
       "14     0.000000      0.000000  0.000019         0.000025    -0.000022\n",
       "15     0.000029      0.000027  0.000019         0.000026    -0.000018\n",
       "16     0.000000      0.000027  0.000019         0.000025    -0.000018\n",
       "17     0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "18     0.000036      0.000027  0.000019         0.000026     0.000020\n",
       "19     0.000020      0.000000  0.000019         0.000022    -0.000018\n",
       "20     0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "21     0.000019      0.000027  0.000038         0.000026     0.000018\n",
       "22     0.000020      0.000027  0.000019         0.000026     0.000031\n",
       "23     0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "24     0.000036      0.000027  0.000019         0.000027    -0.000022\n",
       "25     0.000020      0.000027  0.000019         0.000023    -0.000018\n",
       "26     0.000036      0.000027  0.000019         0.000027    -0.000022\n",
       "27     0.000020      0.000027  0.000038         0.000026    -0.000018\n",
       "28     0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "29     0.000020      0.000027  0.000019         0.000027    -0.000036\n",
       "...         ...           ...       ...              ...          ...\n",
       "38179  0.000000      0.000027  0.000019         0.000026    -0.000022\n",
       "38180  0.000036      0.000027  0.000019         0.000027     0.000031\n",
       "38181  0.000020      0.000027  0.000019         0.000027     0.000040\n",
       "38182  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38183  0.000020      0.000000  0.000019         0.000022    -0.000018\n",
       "38184  0.000020      0.000027  0.000038         0.000026     0.000031\n",
       "38185  0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "38186  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38187  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38188  0.000020      0.000027  0.000019         0.000023    -0.000018\n",
       "38189  0.000035      0.000027  0.000038         0.000027     0.000004\n",
       "38190  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38191  0.000036      0.000027  0.000038         0.000026    -0.000031\n",
       "38192  0.000036      0.000027  0.000038         0.000026     0.000031\n",
       "38193  0.000000      0.000027  0.000019         0.000025     0.000013\n",
       "38194  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38195  0.000040      0.000027  0.000038         0.000025    -0.000022\n",
       "38196  0.000020      0.000027  0.000038         0.000026    -0.000018\n",
       "38197  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38198  0.000020      0.000027  0.000019         0.000027    -0.000036\n",
       "38199  0.000019      0.000027  0.000038         0.000027     0.000031\n",
       "38200  0.000059      0.000027  0.000019         0.000026    -0.000009\n",
       "38201  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38202  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38203  0.000036      0.000027  0.000038         0.000027     0.000031\n",
       "38204  0.000020      0.000027  0.000038         0.000023    -0.000018\n",
       "38205  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38206  0.000036      0.000027  0.000019         0.000026     0.000031\n",
       "38207  0.000020      0.000027  0.000019         0.000026     0.000031\n",
       "38208  0.000020      0.000027  0.000019         0.000027    -0.000036\n",
       "\n",
       "[38209 rows x 5 columns]"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 由于数据只有六维，所以不考虑使用PCA降维"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\ProgramData\\Anaconda3\\envs\\python3\\lib\\site-packages\\sklearn\\model_selection\\_split.py:2010: FutureWarning: From version 0.21, test_size will always complement train_size unless both are specified.\n",
      "  FutureWarning)\n"
     ]
    }
   ],
   "source": [
    "# 将训练集合拆分成训练集和校验集，在校验集上找到最佳的模型超参数（PCA的维数）\n",
    "X_train_part, X_val, y_train_part, y_val = train_test_split(X_train, y_train, train_size = 0.8,random_state = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(30567, 5)\n",
      "(7642, 5)\n"
     ]
    }
   ],
   "source": [
    "#拆分后的训练集和校验集的样本数目\n",
    "print(X_train_part.shape)\n",
    "print(X_val.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 一个参数点（聚类数据为K）的模型，在校验集上评价聚类算法性能\n",
    "def K_cluster_analysis(K, X_train, y_train, X_val, y_val):\n",
    "    start = time.time()\n",
    "    \n",
    "    print(\"K-means begin with clusters: {}\".format(K));\n",
    "    \n",
    "    #K-means,在训练集上训练\n",
    "    mb_kmeans = MiniBatchKMeans(n_clusters = K)\n",
    "    mb_kmeans.fit(X_train)\n",
    "    \n",
    "    # 在训练集和测试集上测试\n",
    "    #y_train_pred = mb_kmeans.fit_predict(X_train)\n",
    "    y_val_pred = mb_kmeans.predict(X_val)\n",
    "    \n",
    "    #以前两维特征打印训练数据的分类结果\n",
    "    #plt.scatter(X_train[:, 0], X_train[:, 1], c=y_pred)\n",
    "    #plt.show()\n",
    "\n",
    "    # K值的评估标准\n",
    "    #常见的方法有轮廓系数Silhouette Coefficient和Calinski-Harabasz Index\n",
    "    #这两个分数值越大则聚类效果越好\n",
    "    #CH_score = metrics.calinski_harabaz_score(X_train,mb_kmeans.predict(X_train))\n",
    "    CH_score = metrics.silhouette_score(X_train,mb_kmeans.predict(X_train))\n",
    "    \n",
    "    #也可以在校验集上评估K\n",
    "    v_score = metrics.v_measure_score(y_val, y_val_pred)\n",
    "    \n",
    "    end = time.time()\n",
    "    print(\"CH_score: {}, time elaps:{}\".format(CH_score, int(end-start)))\n",
    "    print(\"v_score: {}\".format(v_score))\n",
    "    \n",
    "    return CH_score,v_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters: 10\n",
      "CH_score: 0.5488812441988135, time elaps:78\n",
      "v_score: 0.843241134019824\n",
      "K-means begin with clusters: 20\n",
      "CH_score: 0.6904345021593306, time elaps:51\n",
      "v_score: 0.9256219612142126\n",
      "K-means begin with clusters: 30\n",
      "CH_score: 0.7317344059406374, time elaps:49\n",
      "v_score: 0.9068305906174713\n",
      "K-means begin with clusters: 40\n",
      "CH_score: 0.7083684491296856, time elaps:48\n",
      "v_score: 0.8950140816919887\n",
      "K-means begin with clusters: 50\n",
      "CH_score: 0.6672849670436644, time elaps:46\n",
      "v_score: 0.8404961409905171\n",
      "K-means begin with clusters: 60\n",
      "CH_score: 0.6137210867143688, time elaps:46\n",
      "v_score: 0.8422476624434089\n",
      "K-means begin with clusters: 70\n",
      "CH_score: 0.5918725579055281, time elaps:46\n",
      "v_score: 0.8286793229820968\n",
      "K-means begin with clusters: 80\n",
      "CH_score: 0.5487640791604034, time elaps:46\n",
      "v_score: 0.7999304448450356\n"
     ]
    }
   ],
   "source": [
    "# 设置超参数（聚类数目K）搜索范围\n",
    "Ks = [10, 20, 30, 40, 50, 60, 70, 80]\n",
    "CH_scores = []\n",
    "v_scores = []\n",
    "for K in Ks:\n",
    "    ch,v = K_cluster_analysis(K, X_train_part, y_train_part, X_val, y_val)\n",
    "    CH_scores.append(ch)\n",
    "    v_scores.append(v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0.54888124419881346,\n",
       " 0.69043450215933055,\n",
       " 0.73173440594063743,\n",
       " 0.70836844912968555,\n",
       " 0.66728496704366436,\n",
       " 0.61372108671436876,\n",
       " 0.59187255790552806,\n",
       " 0.54876407916040337]"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "CH_scores"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0.84324113401982403,\n",
       " 0.92562196121421259,\n",
       " 0.90683059061747129,\n",
       " 0.89501408169198871,\n",
       " 0.84049614099051706,\n",
       " 0.84224766244340887,\n",
       " 0.82867932298209679,\n",
       " 0.79993044484503562]"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v_scores"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1521e5c0>]"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAD8CAYAAAB3u9PLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcU9X9//HXh2GxUikgo1JEQQURa0UdcEEtIJtagVbL\nYlvFjValQq0Wcaui9mu/rUWt9FupVdEquBQElwyi4FIVZVBkFRlBBdGfU8CtKjDy+f1x7rRxGJjM\nTCY3mbyfj0ceSU7uTT6BTD6555z7OebuiIiINIo7ABERyQ5KCCIiAighiIhIRAlBREQAJQQREYko\nIYiICKCEICIiESUEEREBlBBERCTSOO4AaqJNmzbeoUOHuMMQEckpCxcu/Je7F1a3XU4lhA4dOlBS\nUhJ3GCIiOcXM3kllO3UZiYgIoIQgIiIRJQQREQGUEEREJKKEICIigBKCiIhElBBERARQQpA6mjsX\nHnkEtBKrSO5TQpBamzED+veHH/wAvvc9eO21uCMSkbpQQpBaeewxGDYMuneHSZNgxQo44gj42c+g\nrCzu6ESkNpQQpMZmz4ZTT4VDD4VEAi64AN58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6Xxuvv6\n6PpDQh93D7L3c7AOWOfuL0f3HyYkiGyNF8KX6qvu/v+i+9kaa19gjbuXuftWYDpwDBn43OZTQpgF\nnBndPpPQVx87MzPgb8AKd/9j0kNZF6+ZFZpZy+j2Nwgf3BXAPOC0aLOsiBXA3ce7+97u3oHQVTDX\n3X9MFsZrZs3NbLeK24S+7qVk4ecAwN0/ANaa2YFR0wnAcrI03sgI/ttdBNkb67vAUWa2a/T9UPFv\nW/+f27gHUOppUGYqoe9tK+GXzDmEvuOngVXRdeu444xiPZZw6LcYWBRdTsrGeIHvAq9FsS4Fro7a\n9wNeAUoJh+PN4o61ith7AY9la7xRTK9Hl2XAFVF71n0OkmLuBpREn4dHgFbZGi9hEsQG4FtJbVkZ\naxTbtcAb0d/ZvUCzTHxudaayiIgA+dVlJCIiO6GEICIigBKCiIhElBBERARQQhARkYgSgoiIAEoI\nIiISUUIQEREA/j/9b3h/n6mHRwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x152682b0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 绘制不同PCA维数下模型的性能，找到最佳模型／参数（分数最高）\n",
    "plt.plot(Ks, np.array(CH_scores), 'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x17901c50>]"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VHX6/vH3k4SQEEqAhF4CiEgoAkZUQECagEhTKQoo\ni6KssMoqrg0pX/tPFtEFFVlUWBSGtiCilEgTEUmAAAmGXgIIQekBUvj8/piDG0MgE5jkTHle15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Brxmra8J/Azswvmrc1G7s+bI\n3RpY5MlZrVwJ1lci8Iq13uNeB9kyNwLirNfDf4HSnpoX5wcPfgNKZVvnqVnHAL9Y/8amA0UL43Wr\nf5GrlFJ+xNfGO0oppa5BS18ppfyIlr5SSvkRLX2llPIjWvpKKeVHtPSVUsqPaOkrpZQf0dJXSik/\n8v8Beq1we7p40tUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x15268be0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(v_scores), 'g-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 趋势雷系，CH_scores在k=30，而v_scores是在k=20的时候得到了最佳值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#显示聚类结果\n",
    "#画出聚类结果，每一类用一种颜色\n",
    "colors = ['b','g','r','k','c','m','y','#e24fff','#524C90','#845868', '#cccccc','#ffffff','#784c23','#577656','#334523','#467898','y','#333333','#524C00','#845788']\n",
    "\n",
    "n_clusters = 20\n",
    "mb_kmeans = MiniBatchKMeans(n_clusters = n_clusters)\n",
    "mb_kmeans.fit(X_train)\n",
    "\n",
    "y_train_pred = mb_kmeans.labels_\n",
    "cents = mb_kmeans.cluster_centers_#质心"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MiniBatchKMeans(batch_size=100, compute_labels=True, init='k-means++',\n",
       "        init_size=None, max_iter=100, max_no_improvement=10, n_clusters=20,\n",
       "        n_init=3, random_state=None, reassignment_ratio=0.01, tol=0.0,\n",
       "        verbose=0)"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mb_kmeans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        0\n",
       "0       1\n",
       "1       1\n",
       "2      14\n",
       "3       8\n",
       "4       3\n",
       "5      16\n",
       "6       1\n",
       "7       3\n",
       "8       1\n",
       "9       3\n",
       "10     19\n",
       "11     11\n",
       "12      3\n",
       "13      8\n",
       "14      0\n",
       "15     14\n",
       "16     12\n",
       "17      1\n",
       "18      1\n",
       "19      0\n",
       "20      1\n",
       "21      8\n",
       "22     19\n",
       "23     11\n",
       "24     18\n",
       "25     14\n",
       "26     18\n",
       "27      2\n",
       "28     11\n",
       "29      4\n",
       "...    ..\n",
       "38179  12\n",
       "38180   1\n",
       "38181  19\n",
       "38182   1\n",
       "38183   0\n",
       "38184  11\n",
       "38185   3\n",
       "38186   1\n",
       "38187   1\n",
       "38188  14\n",
       "38189  16\n",
       "38190   1\n",
       "38191   9\n",
       "38192   3\n",
       "38193  17\n",
       "38194   1\n",
       "38195   9\n",
       "38196   2\n",
       "38197   1\n",
       "38198   4\n",
       "38199  11\n",
       "38200   6\n",
       "38201   1\n",
       "38202   1\n",
       "38203   3\n",
       "38204   2\n",
       "38205   1\n",
       "38206   1\n",
       "38207  19\n",
       "38208   4\n",
       "\n",
       "[38209 rows x 1 columns]"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train_pred\n",
    "df_y = pd.DataFrame(y_train_pred)\n",
    "df_y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.36493881,  0.27295209,  0.18882888,  0.26377671,  0.3557437 ],\n",
       "       [ 0.36493881,  0.27281513,  0.18882888,  0.25601857,  0.31127574],\n",
       "       [ 0.20175479,  0.27048689,  0.18882888,  0.26377671, -0.17787185],\n",
       "       ..., \n",
       "       [ 0.36493881,  0.273226  ,  0.18882888,  0.26377671,  0.31127574],\n",
       "       [ 0.20175479,  0.27240427,  0.18882888,  0.26377671,  0.31127574],\n",
       "       [ 0.20175479,  0.27117167,  0.18882888,  0.27153485, -0.3557437 ]])"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train_array = np.array(X_train_amplified)\n",
    "X_train_array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_train_array = np.array(y_train)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  1.94977935e-05,   0.00000000e+00,   2.78951759e-05,\n",
       "          2.27101872e-05,  -1.94547338e-05],\n",
       "       [  3.67674002e-05,   2.72766986e-05,   1.88828883e-05,\n",
       "          2.64867697e-05,   3.10841484e-05],\n",
       "       [  2.08398938e-05,   2.71859361e-05,   3.77657767e-05,\n",
       "          2.51561767e-05,  -1.90881097e-05],\n",
       "       [  3.67344733e-05,   2.72748413e-05,   3.77657767e-05,\n",
       "          2.65020000e-05,   3.14553828e-05],\n",
       "       [  2.02780873e-05,   2.71813078e-05,   1.87255309e-05,\n",
       "          2.65716243e-05,  -3.50370492e-05],\n",
       "       [  2.20778384e-05,   2.72175472e-05,   1.88828883e-05,\n",
       "          2.66606147e-05,   1.78656581e-05],\n",
       "       [  5.97651724e-05,   2.50476990e-05,   2.83243325e-05,\n",
       "          2.55814408e-05,  -1.14680536e-05],\n",
       "       [  2.65413044e-05,   2.59579157e-05,   1.84632686e-05,\n",
       "          2.63431902e-05,   4.19975207e-06],\n",
       "       [  2.15485710e-05,   2.72442489e-05,   3.77657767e-05,\n",
       "          2.64137552e-05,   1.44262345e-05],\n",
       "       [  4.00542602e-05,   2.72440790e-05,   3.77657767e-05,\n",
       "          2.63776708e-05,  -3.21651599e-05],\n",
       "       [  2.29051029e-05,   2.71719491e-05,   3.77657767e-05,\n",
       "          2.68431591e-05,   4.71360408e-05],\n",
       "       [  1.90032563e-05,   2.72400600e-05,   3.77657767e-05,\n",
       "          2.66616741e-05,   3.13062401e-05],\n",
       "       [  0.00000000e+00,   2.72462601e-05,   2.69256000e-05,\n",
       "          2.63920378e-05,  -2.23575036e-05],\n",
       "       [  7.58520420e-05,   2.09541745e-05,   2.61455377e-05,\n",
       "          2.57808910e-05,   2.63387166e-05],\n",
       "       [  2.09361996e-05,   2.71663754e-05,   1.88828883e-05,\n",
       "          2.54304563e-05,  -2.01915576e-05],\n",
       "       [  1.91511639e-05,   2.71439059e-05,   3.77657767e-05,\n",
       "          2.63037838e-05,  -3.32980342e-05],\n",
       "       [  3.65583811e-05,   2.72231586e-05,   3.77657767e-05,\n",
       "          2.64114019e-05,   8.41024519e-06],\n",
       "       [  0.00000000e+00,   2.61553188e-05,   2.03354182e-05,\n",
       "          2.66163828e-05,   8.80807730e-06],\n",
       "       [  3.77509450e-05,   2.72598889e-05,   1.88828883e-05,\n",
       "          2.61735093e-05,  -2.70318407e-05],\n",
       "       [  1.99134755e-05,   2.72396537e-05,   1.88828883e-05,\n",
       "          2.62838224e-05,   3.20778975e-05]])"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cents"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1,  1, 14, ...,  1, 19,  4])"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_train_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  3.64938815e-05,   2.72952090e-05,   1.88828883e-05,\n",
       "          2.63776708e-05,   3.55743704e-05],\n",
       "       [  3.64938815e-05,   2.72815135e-05,   1.88828883e-05,\n",
       "          2.56018570e-05,   3.11275741e-05],\n",
       "       [  2.01754792e-05,   2.70486893e-05,   1.88828883e-05,\n",
       "          2.63776708e-05,  -1.77871852e-05],\n",
       "       ..., \n",
       "       [  3.64938815e-05,   2.73226001e-05,   1.88828883e-05,\n",
       "          2.63776708e-05,   3.11275741e-05],\n",
       "       [  2.01754792e-05,   2.72404268e-05,   1.88828883e-05,\n",
       "          2.63776708e-05,   3.11275741e-05],\n",
       "       [  2.01754792e-05,   2.71171670e-05,   1.88828883e-05,\n",
       "          2.71534847e-05,  -3.55743704e-05]])"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train = np.array(X_train)\n",
    "X_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAD8CAYAAACo9anUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuUXWWZ5/HvL5VUuOZWFBdzgQKKS0BG2mO0h2l1ACGR\nltCKbWht48CYVqHnD9bqFcBx0h1w2ojTmbHFS4CMqIsJGF2dGhUY5NLarVwqTTqYSJkioaEIQiVV\nCZeEJFV55o/zBk4q+1QlVaf2Oan6fdY6q/Z5zvs+77s3oZ7aZ79nH0UEZmZmeRpT7QmY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PcufiYmVnuXHzMzCx3Lj5mZpY7Fx8zM8udi4+ZmeXu/wPA6KuEacdDTwAAAABJ\nRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1870a748>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "for i in range(n_clusters):\n",
    "    index = np.nonzero(y_train_pred==i)[0]\n",
    "    x2 = X_train[index,2]\n",
    "    x3 = X_train[index,3]\n",
    "    y_i = y_train[index]\n",
    "    \n",
    "    plt.scatter(x2,x3,color=colors[i],linewidths=0.1)\n",
    "\n",
    "plt.axis([-0.00001, 0.00009, -0.00001,0.00003])\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.figure.Figure at 0x185b3780>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.savefig( 'clustering.png' )\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MiniBatchKMeans(batch_size=100, compute_labels=True, init='k-means++',\n",
       "        init_size=None, max_iter=100, max_no_improvement=10, n_clusters=30,\n",
       "        n_init=3, random_state=None, reassignment_ratio=0.01, tol=0.0,\n",
       "        verbose=0)"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mb_kmeans = MiniBatchKMeans(n_clusters = 30)\n",
    "mb_kmeans.fit(X_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred = mb_kmeans.predict(X_train)    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred = pd.DataFrame(y_pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38179</th>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38180</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38181</th>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38182</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38183</th>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38184</th>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38185</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38186</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38187</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38188</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38189</th>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38190</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38191</th>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38192</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38193</th>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38194</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38195</th>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38196</th>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38197</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38198</th>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38199</th>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38200</th>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38201</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38202</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38203</th>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38204</th>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38205</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38206</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38207</th>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38208</th>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>38209 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        0\n",
       "0       1\n",
       "1       1\n",
       "2       0\n",
       "3       3\n",
       "4      14\n",
       "5      19\n",
       "6       1\n",
       "7      14\n",
       "8       1\n",
       "9      14\n",
       "10     10\n",
       "11     13\n",
       "12     14\n",
       "13      3\n",
       "14      9\n",
       "15      0\n",
       "16     12\n",
       "17      1\n",
       "18      1\n",
       "19      9\n",
       "20      1\n",
       "21      3\n",
       "22     10\n",
       "23     13\n",
       "24     28\n",
       "25      0\n",
       "26     28\n",
       "27      8\n",
       "28     13\n",
       "29      5\n",
       "...    ..\n",
       "38179  12\n",
       "38180   1\n",
       "38181  10\n",
       "38182   1\n",
       "38183   9\n",
       "38184  13\n",
       "38185  14\n",
       "38186   1\n",
       "38187   1\n",
       "38188   0\n",
       "38189  19\n",
       "38190   1\n",
       "38191  23\n",
       "38192  14\n",
       "38193  26\n",
       "38194   1\n",
       "38195  16\n",
       "38196   8\n",
       "38197   1\n",
       "38198   5\n",
       "38199  13\n",
       "38200   7\n",
       "38201   1\n",
       "38202   1\n",
       "38203  14\n",
       "38204   8\n",
       "38205   1\n",
       "38206   1\n",
       "38207  10\n",
       "38208   5\n",
       "\n",
       "[38209 rows x 1 columns]"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_pred.to_csv('users_final_pred.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
